package com.entity;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;



public class Person {

    private String name; //姓名
    private String gender; //性别
    private int age; //年龄
    private List<Car> cars; //拥有的车的集合

    private Set<String> address; //住址的集合
    private Map<String,String> accounts; //银行账号的集合(Map)
    private Properties phonezone; //城市区号和城市名字的属性文档

    public Person() {

        System.out.println("一个人从世界上诞生了...");
    }

    public Person(String name, String gender, int age, List<Car> cars, Set<String> address, Map<String, String> accounts, Properties phonezone) {
        this();
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.cars = cars;
        this.address = address;
        this.accounts = accounts;
        this.phonezone = phonezone;
    }


    public void initPerson(){
        System.out.println("initPerson()...");
    }


    public void destroyPerson(){
        System.out.println("destroyPerson()...");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<Car> getCars() {
        return cars;
    }

    public void setCars(List<Car> cars) {
        this.cars = cars;
    }

    public Set<String> getAddress() {
        return address;
    }

    public void setAddress(Set<String> address) {
        this.address = address;
    }

    public Map<String, String> getAccounts() {
        return accounts;
    }

    public void setAccounts(Map<String, String> accounts) {
        this.accounts = accounts;
    }

    public Properties getPhonezone() {
        return phonezone;
    }

    public void setPhonezone(Properties phonezone) {
        this.phonezone = phonezone;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", cars=" + cars +
                ", address=" + address +
                ", accounts=" + accounts +
                ", phonezone=" + phonezone +
                '}';
    }
}
